package com.liao.content.api;

import com.liao.content.model.dto.MovieBaseHotDto;
import com.liao.content.model.po.MovieBase;
import com.liao.content.service.MovieHotService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 热门电影表 前端控制器
 * </p>
 *
 * @author liao
 */
@Slf4j
@RestController
@RequestMapping("movieHot")
public class MovieHotController {

    @Autowired
    private MovieHotService movieHotService;

    /**
     * @description: 根据分类id查出10条人热门数据
     * @author liao
     * @date 2023/7/22 15:53
     * @version 1.0
     */
    @GetMapping("/list")
    public List<MovieBaseHotDto> list(@Param("categoryId") String categoryId ){
        return movieHotService.getHotMovieByMt(categoryId);
    }


}
